﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListCustomerResult.ascx.cs" Inherits="PayrollHR.Administration.Modules.ListCustomerResult" %>
<%@ Register Src="CustomerSearch.ascx" TagName="CustomerSearch" TagPrefix="uc1" %>
<%@ Register src="CustomerResultSearch.ascx" tagname="CustomerResultSearch" tagprefix="uc2" %>
<script type="text/javascript">
    $(window).bind('load', function () {
        var cbHeader = $(".cbHeader input");
        var cbRowItem = $(".cbRowItem input");
        cbHeader.bind("click", function () {
            cbRowItem.each(function () { this.checked = cbHeader[0].checked; })
        });
        cbRowItem.bind("click", function () { if ($(this).checked == false) cbHeader[0].checked = false; });
    });
</script>
<asp:UpdatePanel ID="upForumSubscriptions" runat="server">
    <ContentTemplate>
        <div class="section-header">
            <div class="title">                
                <%=GetLocaleResourceString("Admin.CusomerResultManager.ManagerCustomerResult")%>
            </div>
           <div class="options">
                <asp:HyperLink runat="server" Visible="False" ID="hlexport" ForeColor="#6600CC">[hlexport]</asp:HyperLink>
                <asp:Button ID="SearchButton" runat="server" Text="Filter"
                    CssClass="adminButtonBlue" OnClick="SearchButton_Click" ToolTip="Filter" />
              <asp:Button runat="server" Text="Xử Lý"
                    CssClass="adminButtonBlue" ID="btnSend" OnClick="btnSend_Click" ValidationGroup="ExportXLS"
                    ToolTip="Delete Customer" />
 
       
    
            </div>
        </div>

        <div>
            <uc2:CustomerResultSearch ID="CustomerResultSearch1" runat="server" />
        </div>
        <p></p>
        <asp:GridView ID="gvCustomersResult" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="CustomerID"
            OnPageIndexChanging="gvCustomersResult_PageIndexChanging" AllowPaging="True"  ViewStateMode="Enabled"
            PageSize="12">
            <Columns>
                <asp:TemplateField ItemStyle-Width="0.5%" ItemStyle-HorizontalAlign="Center">
                    <HeaderTemplate>
                        <asp:CheckBox ID="cbSelectAll" runat="server" CssClass="cbHeader" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbCustomerInfo" runat="server" CssClass="cbRowItem" ToolTip="<% $PayrollResources:Admin.Customers.CustName.ToolTip %>" />
                        <asp:HiddenField ID="hfCustomerID" runat="server" Value='<%# Eval("CustomerId") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="0.5%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tên Khách Hàng" ItemStyle-Width="16%">
                    <ItemTemplate>
                        <asp:HyperLink ID="ActionHyperLink" runat="server" Text='<%# Eval("CustomerName") %>' />                        
                    </ItemTemplate>
                    <ItemStyle Width="16%" />
                </asp:TemplateField>
                   
                <asp:TemplateField HeaderText=" Ngày Tạo"
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("CreateDate") != null ? Eval("CreateDate").ToString() : "")%>                        
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="10%" />
                </asp:TemplateField> 

                    <asp:TemplateField HeaderText=" Tên Gói "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("Name") != null ? Eval("Name").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="7%" />
                </asp:TemplateField>
                     <asp:TemplateField HeaderText=" Mã Code "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("PackageCode") != null ? Eval("PackageCode").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="8%" />
                </asp:TemplateField>
                  <asp:TemplateField HeaderText=" Tax Code "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("TaxCode") != null ? Eval("TaxCode").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="10%" />
                </asp:TemplateField>
                  <asp:TemplateField HeaderText=" Mobile  "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("Mobile") != null ? Eval("Mobile").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="5%" />
                </asp:TemplateField>
                  <asp:TemplateField HeaderText=" Email  "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("ResFrom") != null ? Eval("ResFrom").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="10%" />
                </asp:TemplateField>
                    <asp:TemplateField HeaderText=" Địa Chỉ  "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("Address") != null ? Eval("Address").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="13%" />
                </asp:TemplateField>
                
                  

                  
                     <asp:TemplateField HeaderText=" Thông Tin  "
                    HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <%#Server.HtmlEncode(Eval("CustomerProfile") != null ? Eval("CustomerProfile").ToString() : "")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" Width="13%" />
                </asp:TemplateField>



            
                
     
         
            </Columns>
            <PagerSettings PageButtonCount="50" Position="TopAndBottom" />
        </asp:GridView>
    </ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="up1" runat="server" AssociatedUpdatePanelID="upForumSubscriptions">
    <ProgressTemplate>
        <div class="progress">
            <asp:Image ID="imgUpdateProgress" runat="server" ImageUrl="~/images/UpdateProgress.gif"
                AlternateText="update" />
            <%=GetLocaleResourceString("Admin.Common.Wait...")%>
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>


